export default class LastMayday {
    palette() {
        let width = 750;
        let height = 1200;
        let askName = "周某";
        let answerName = "老师";
        let code =
            "https://gips3.baidu.com/it/u=3557221034,1819987898&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960";
        let askAvatar =
            "https://gips3.baidu.com/it/u=3557221034,1819987898&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960";
        let answerAvatar =
            "https://gips3.baidu.com/it/u=3557221034,1819987898&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960";
        let askText = "问题问题问题问题问题问题问题问题问题问题问题问题问题问题";
        let answerText =
            "答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案答案";
        let time = "2020_4_1";

        function _textDecoration(text, css) {
            return {
                type: "text",
                text: text,
                css: css,
            };
        }
        return {
            width: width + "px",
            height: height + "px",
            background: "#30C4A7",
            views: [
                _textDecoration(askName + " @精致女主圈", {
                    top: "30px",
                    left: "33px",
                    fontSize: "30px",
                    color: "#fff",
                }),
                _textDecoration("12580+人 都在这里提问", {
                    top: "90px",
                    left: "33px",
                    fontSize: "28px",
                    color: "#fff",
                }),
                {
                    type: "image",
                    url: code,
                    css: {
                        top: "30px",
                        right: "30px",
                        width: "126px",
                        height: "126px",
                        borderRadius: "10px",
                        mode: "widthFix",
                    },
                },
                {
                    type: "rect",
                    css: {
                        top: "180px",
                        left: width / 2 + "px",
                        width: "690px",
                        height: "1000px",
                        borderRadius: "10px",
                        color: "#fff",
                        align: "center",
                    },
                },
                {
                    type: "image",
                    url: askAvatar,
                    css: {
                        top: "230px",
                        left: "174px",
                        width: "100px",
                        height: "100px",
                        borderRadius: "50px",
                        mode: "aspectFill",
                    },
                },
                _textDecoration(askName, {
                    top: "350px",
                    left: 690 / 2 - 125 + "px",
                    fontSize: "30px",
                    color: "#000",
                    align: "center",
                }),
                {
                    type: "image",
                    url: "https://gips3.baidu.com/it/u=3557221034,1819987898&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960",
                    css: {
                        top: "280px",
                        left: "313px",
                        width: "123px",
                        mode: "widthFix",
                    },
                },
                _textDecoration("提问", {
                    top: "250px",
                    left: "347px",
                    fontSize: "30px",
                    color: "#000",
                }),
                {
                    type: "image",
                    url: answerAvatar,
                    css: {
                        top: "230px",
                        right: "174px",
                        width: "100px",
                        height: "100px",
                        borderRadius: "50px",
                        mode: "aspectFill",
                    },
                },
                _textDecoration(answerName, {
                    top: "350px",
                    right: 690 / 2 - 125 + "px",
                    fontSize: "30px",
                    color: "#000",
                    align: "center",
                }),
                _textDecoration(askText, {
                    maxLines: 2,
                    lineHeight: "40px",
                    width: "629px",
                    top: "420px",
                    left: "60px",
                    fontSize: "30px",
                    color: "#000",
                }),
                _textDecoration(answerText, {
                    maxLines: 7,
                    lineHeight: "40px",
                    width: "629px",
                    top: "550px",
                    left: "60px",
                    fontSize: "30px",
                    color: "#000",
                }),
                _textDecoration(time, {
                    top: "850px",
                    right: "60px",
                    fontSize: "28px",
                    color: "#666666",
                }),
                {
                    type: "image",
                    url: code,
                    css: {
                        top: "900px",
                        left: width / 2 - 100 + "px",
                        width: "200px",
                        height: "200px",
                        mode: "aspectFill",
                    },
                },
                _textDecoration("长按或保存二维码查看原文", {
                    top: "1120px",
                    left: width / 2 + "px",
                    fontSize: "28px",
                    color: "#666666",
                    align: "center",
                }),
            ],
        };
    }
}